%% Author: zhangjun
%% Created: 2009-3-29
%% Description: TODO: Add description to xmlparser
-module(xmlparser).

%%
%% Include files
%%

%%
%% Exported Functions
%%
-compile(export_all).
-include_lib("xmerl/include/xmerl.hrl").

%%% File is filename ,type is string
parse(File) ->
	{#xmlElement{content = Exports}, _} = xmerl_scan:file(File),
	[{Tag, Val} || 
	 #xmlElement{content = Products} <- Exports,
	 #xmlElement{content = Fields} <- Products,
	 #xmlText{parents = [{Tag, _} | _], value =  Val} <- Fields].

%%
%% Local Functions
%%

